function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
export * from "./area-linkage";
export * from "./Attachment";
export * from "./BMap";
export * from "./download-excel";
export * from "./express";
export * from "./filterRules";
export * from "./grid";
export * from "./help";
export * from "./html-editor";
export * from "./imp";
export * from "./org-tree";
export * from "./print";
export * from "./project-tree";
export * from "./query-panel";
export * from "./work-flow";
import { registerComponent } from "../util";
import { Grid } from "./grid";
import * as HelpCpts from "./help";

// 是否默认导入标记
var hasDefaultRegister = false;

/**
 * 注入业务组件到@newgrand/iup-core
 */
export function injectBusinessComponents(cpt, options) {
  if (!hasDefaultRegister) {
    hasDefaultRegister = true;
    Object.keys(HelpCpts).forEach(function (key) {
      if (!['SingleHelp', 'MultipleHelp'].includes(key) && !key.startsWith('Multiple') && key.endsWith('Help')) {
        registerComponent(_defineProperty({}, "Multiple".concat(key), HelpCpts[key]), {
          isHelp: true,
          defaultProps: {
            multiple: true
          }
        });
      }
      if (key.startsWith('Multiple')) {
        registerComponent(_defineProperty({}, key, HelpCpts[key]), {
          isHelp: true,
          defaultProps: {
            multiple: true
          }
        });
      } else {
        registerComponent(_defineProperty({}, key, HelpCpts[key]), {
          isHelp: true
        });
      }
    });
    registerComponent({
      Grid: Grid
    });
  }
  cpt && registerComponent(cpt, options);
}